package cn.aion.dao;

import cn.aion.model.ScanYouku;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Param;

/**
 * 对应ad_scan_youku表，存储扫描记录
 * Created by Aion on 2016/11/1.
 */
public interface ScanYoukuDAO {
    @Insert("insert into ad_scan_youku (project_id,vv,create_time) values (#{scanYouku.projectId},#{scanYouku.vv},unix_timestamp(now()))")
    @Options(useGeneratedKeys = true, keyProperty = "scanYouku.id")
    int save(@Param("scanYouku") ScanYouku scanYouku);

    @Delete("delete from ad_scan_youku where id=#{id}")
    void delete(Integer id);


}
